<?php
$books = array(
    array(
        "id" => "1",
        "name" => "0005/2555",
        "series" => array(
        	array(
        		"name" => "รับรายงาน",
        		//Fri Jan 01 2010 00:00:00 GMT+0700 (ICT)
	        	"start" => date('2010-01-22'),
	        	"end" => date('2010-01-25')
        	),
        	array(
        		"name" => "รอดำเนินการ",
	        	"start" => date('2010-01-25'),
	        	"end" => date('2010-02-06'),
	        	"color" => "#f0f0f0"
        	),
        	array(
        		"name" => "กำลังดำเนินการ",
	        	"start" => date('2010-02-06'),
	        	"end" => date('2010-03-10'),
	        	"color" => "#e0e0e0"
        	)
        )
    )
    // array(
    //     "id" => "2",
    //     "name" => "Feature 2",
    //     "series" => array(
    //     	array(
    //     		"name" => "Planned",
	   //      	"start" => date('2010-01-05'),
	   //      	"end" => date('2010-01-20')
    //     	),
    //     	array(
    //     		"name" => "Actual",
	   //      	"start" => date('2010-01-06'),
	   //      	"end" => date('2010-01-17'),
	   //      	"color" => "#f0f0f0"
    //     	),
    //     	array(
    //     		"name" => "Projected",
	   //      	"start" => date('2010-01-06'),
	   //      	"end" => date('2010-01-17'),
	   //      	"color" => "#f0f0f0"
    //     	)
    //     )
    // ),
    // array(
    //     "id" => "3",
    //     "name" => "Feature 3",
    //     "series" => array(
    //     	array(
    //     		"name" => "Planned",
	   //      	"start" => date('2010-01-11'),
	   //      	"end" => date('2010-02-05')
    //     	),
    //     	array(
    //     		"name" => "Actual",
	   //      	"start" => date('2010-01-15'),
	   //      	"end" => date('2010-02-03'),
	   //      	"color" => "#f0f0f0"
    //     	)
    //     )
    // )
);

$books_js = json_encode( $books );
?>

	<script type="text/javascript">
		var ganttData = <?php echo $books_js ?>;

		// alert(ganttData[0].series[0].name);
	</script>
	

	<link rel="stylesheet" type="text/css" href="<?php echo base_url('ganttView/jquery.ganttView.css'); ?>" />
	<style type="text/css">
		#ganttChart {
			font-family: tahoma, verdana, helvetica;
			font-size: 0.8em;
			padding: 10px;
		}
	</style>

		<section >
	    <div class="page-header">
	      <h1>Gant Chart</h1>
	    </div>


	    <div id="ganttChart"></div>
	    
			
	  </section>

	 	<!-- Javascript -->
		<script type="text/javascript" src="<?php echo base_url('ganttView/lib/jquery-1.4.2.js'); ?>"></script>
		<script type="text/javascript" src="<?php echo base_url('ganttView/lib/date.js'); ?> "></script>
		
		<script type="text/javascript" src="<?php echo base_url('ganttView/jquery.ganttView.js');?> "></script>
		

		<script type="text/javascript">
			$(function () {
				$("#ganttChart").ganttView({ 
					data: ganttData,
					slideWidth: 530,

				});
			});
			</script>

		<!-- <script type="text/javascript" src="../jquery.ganttView.js"></script> -->
		

      

 		
